<?php

namespace api\libs\swoft;

use api\libs\swoft\core\SwoftCore;
use api\libs\swoft\ifc\SwoftClient;
use yii\helpers\Json;

class SwoftDict extends SwoftClient
{
    public function district($arr_request,$access_token) {
        $options[SwoftCore::SWOFT_RESOURCE] = $this->getBaseUri() . 'meta-data/district';
        $options[SwoftCore::SWOFT_QUERY_STRING] = array_merge($arr_request, ['token' => $access_token]);
        $options[SwoftCore::SWOFT_METHOD] = SwoftCore::SWOFT_HTTP_GET;
        return $this->sendRequest($options);
    }
    public function streets($arr_request,$access_token) {
        $options[SwoftCore::SWOFT_RESOURCE] = $this->getBaseUri() . 'meta-data/streets';
        $options[SwoftCore::SWOFT_QUERY_STRING] = array_merge($arr_request, ['token' => $access_token]);
        $options[SwoftCore::SWOFT_METHOD] = SwoftCore::SWOFT_HTTP_GET;
        return $this->sendRequest($options);
    }
    public function departments($arr_request,$access_token) {
        $options[SwoftCore::SWOFT_RESOURCE] = $this->getBaseUri() . 'meta-data/streets';
        $options[SwoftCore::SWOFT_QUERY_STRING] = array_merge($arr_request, ['token' => $access_token]);
        $options[SwoftCore::SWOFT_METHOD] = SwoftCore::SWOFT_HTTP_GET;
        return $this->sendRequest($options);
    }
    public function linkGrids($arr_request,$access_token) {
        $options[SwoftCore::SWOFT_RESOURCE] = $this->getBaseUri() . 'meta-data/link-grids';
        $options[SwoftCore::SWOFT_QUERY_STRING] = array_merge($arr_request, ['token' => $access_token]);
        $options[SwoftCore::SWOFT_METHOD] = SwoftCore::SWOFT_HTTP_GET;
        return $this->sendRequest($options);
    }
    public function eventType($arr_request,$access_token) {
        $options[SwoftCore::SWOFT_RESOURCE] = $this->getBaseUri() . 'meta-data/event-types';
        $options[SwoftCore::SWOFT_QUERY_STRING] = array_merge($arr_request, ['token' => $access_token]);
        $options[SwoftCore::SWOFT_METHOD] = SwoftCore::SWOFT_HTTP_GET;
        return $this->sendRequest($options);
    }
    public function eventTypeDict($arr_request,$access_token) {
        $options[SwoftCore::SWOFT_RESOURCE] = $this->getBaseUri() . 'meta-data/event-type-dict';
        $options[SwoftCore::SWOFT_QUERY_STRING] = array_merge($arr_request, ['token' => $access_token]);
        $options[SwoftCore::SWOFT_METHOD] = SwoftCore::SWOFT_HTTP_GET;
        return $this->sendRequest($options);
    }
}